package org.jadapter;

/**
 * Created by IntelliJ IDEA.
 * User: vs
 * Date: 3.3.2008
 * Time: 11:28:55
 * To change this template use File | Settings | File Templates.
 */
public class JUtility<PROVIDES,FOR> extends JComponent<PROVIDES,FOR> {

    PROVIDES utility;

    public boolean canRegister() {
        return !isRegistered() && provides != null && utility != null;
    }

    public PROVIDES getUtility() {
        return utility;
    }

    public void setUtility(PROVIDES utility) {
        this.utility = utility;
        register();
    }
}
